<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:util="http://java.sun.com/jsf/composite/util">

<ui:composition>
	<h:form>
		<rich:panel>
			<h:panelGrid columns="1">
				<h:panelGrid columns="2" cellpadding="4">
					<util:formField
						beanProperty="#{clientRegisterBean.client.first_name}"
						title="Imię" size="48" required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.last_name}"
						title="Nazwisko" size="49" required="true" />
				</h:panelGrid>
				<h:outputText value="Data urodzenia: " styleClass="formOutputField" />
				<rich:calendar value="#{clientRegisterBean.client.date_of_birth}"
					id="calendar" datePattern="d/M/yy" showApplyButton="true"
					cellWidth="24px" cellHeight="22px" style="width:200px">
				</rich:calendar>
				<br />
				<h:outputText value="Adres:" style="font-size: 14px;" />
				<h:panelGrid columns="3" cellpadding="4">
					<util:formField beanProperty="#{clientRegisterBean.client.street}"
						title="Ulica" size="50" required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.house_number}"
						title="Nr domu" size="20" required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.apartment_number}"
						title="Nr mieszkania" size="20" required="true" />
				</h:panelGrid>
				<h:panelGrid columns="2" cellpadding="4">
					<util:formField beanProperty="#{clientRegisterBean.client.post}"
						title="Poczta" size="70" required="true" />
					<util:formField
						beanProperty="#{clientRegisterBean.client.postal_code}"
						title="Kod pocztowy" size="27" required="true" />
				</h:panelGrid>
				<br />

				<h:outputText value="Kontakt:" style="font-size: 14px;" />
				<util:formField beanProperty="#{clientRegisterBean.client.email}"
					title="E-mail" size="106" required="true" />
				<util:formField beanProperty="#{clientRegisterBean.client.phone}"
					title="Telefon" size="106" required="true" />
				<br />
				<h:panelGrid columns="1" cellpadding="4">

					<h:panelGroup>
						<h:outputText value="Hasło:" styleClass="formOutputField" />
						<br />
						<h:inputSecret value="#{clientRegisterBean.client.passwd}"
							size="30" required="true" styleClass="formInputField">
						</h:inputSecret>
					</h:panelGroup>
					<!--					<h:panelGroup>-->
					<!--						<h:outputText value="Hasło:" styleClass="formOutputField" />-->
					<!--						<br />-->
					<!--						<h:inputSecret value="#{clientRegisterBean.client.passwd}" size="30"-->
					<!--							required="true" styleClass="formInputField">-->
					<!--						</h:inputSecret>-->
					<!--					</h:panelGroup>-->
				</h:panelGrid>
			</h:panelGrid>

			<h:panelGrid columns="2" cellspacing="10"
				style="margin-left: auto; margin-right: auto;">
				<h:commandButton value="Załóż konto"
					actionListener="#{clientRegisterBean.createClient}"
					action="#{jsfutils.redirect('mainContent/booksTablePage')}" />
				<h:commandButton value="Anuluj"
					action="#{jsfutils.redirect('mainContent/booksTablePage')}" />
			</h:panelGrid>
		</rich:panel>
	</h:form>
</ui:composition>
</html>
